package com.yike.product.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 商品单位
 *
 * @author Sakura
 * @since 2024-10-18
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "商品单位参数")
public class GoodsUnitParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("单位ID")
    private Long id;

    @ApiModelProperty("单位名称")
    @NotBlank(message = "单位名称不能为空")
    @Length(min = 1, max = 32, message = "单位名称长度为1-32个字符")
    private String name;

    @ApiModelProperty("是否展示：1展示 0不展示")
    private Boolean displayed;

    @ApiModelProperty("排序")
    private Integer sort;

    @ApiModelProperty("描述")
    private String description;

}
